<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<head>
<title>E-Mail Submit (js5_01)</title>
<script type="text/javascript">
function fnNameOK() {
	   strName=document.frmDetails.txtName.value
	   if((strName=="")||!isNaN(strName)) {return false}
	   else {return true}
	}   
	function fnEmailOK() {
	   strEmail=document.frmDetails.txtEmail.value
	   if((strEmail=="")|| !isNaN(strEmail)) {
	   /* alert("email"); */
	   return false;}
	   else {return true}
	}  
	function fnPostCodeOK() {
	   strPostCode=document.frmDetails.txtPostCode.value
	   if((strPostCode=="")|| isNaN(strPostCode) || (strPostCode.length)!=5) {return false}
	   else {return true}
	} 
	function fnCheckOK() {
	   if(fnNameOK() && fnEmailOK() && fnPostCodeOK()) {
	      document.frmDetails.message.value="The following information has been submitted:"
	       +"\r\r"+strName+"\r"+strEmail+"\r"+strPostCode; }
	   else {alert("You have entered bad information into one or more fields");
	   }
	}


</script>
</head>
<body>
	<form name="frmDetails" action="kk.jsp" method="post" onsubmit="return fnNameOK()">
		<table>
			<tr>
				<td>Name:</td>
				<td><input name="txtName" type="text" value="" /></td>
			</tr>
			<tr>
				<td>E-mail:</td>
				<td><input name="txtEmail" type="text" value="" /></td>
			</tr>
			<tr>
				<td>Post Code:<br>(exactly 5 digits please)
				</td>
				<td><input name="txtPostCode" type="text" value="" /></td>
			</tr>
		
		</table>
		
		<textarea name="message" rows="7" cols="40"></textarea>
		
		<p>
			<input type = "submit" value="Submit"/>
		</p> 
	</form>
</body>
</html>